package com.Day1009;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;

public class FileStream {
    public static void main(String[] args) throws IOException {
//    字节流 8位（输入输出流）   字符流  16位
//    fileInputStream             Reader
//    fileOutputStream            Writer
        String filePath = "D:\\IDEA\\dddd\\src\\com\\lzy\\day01\\Text.java";
        //   input 输入   stream  字节
        FileInputStream fileInputStream = new FileInputStream(filePath);
        byte[] temp = new byte[1024];
        StringBuffer stringBuffer = new StringBuffer();
        while (fileInputStream.read(temp) != -1){
            String str = new String(temp);
            stringBuffer.append(str);
        }
        System.out.println(stringBuffer.toString());
        fileInputStream.close();
    }
}
